import request from '@/router/axios';

/**
 * 生成验证码
 * @param random
 */
export const getCaptcha = (random) => {
  return request({
    url: '/auth/kaptcha/code',
    method: 'get',
    params: {
      random
    }
  })
}

/**
 * 验证码校验
 */
export const validCaptcha = (random, value) => {
  return request({
    url: '/auth/kaptcha/valid',
    method: 'post',
    params: {
      random,
      value,
    }
  })
}
